package com.iflytek.exam.mapper;

import java.util.List;
import com.iflytek.exam.domain.Judge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 判断题Mapper接口
 *
 * @author Dogdog
 * @date 2024-07-07
 */
@Mapper
public interface JudgeMapper
{
    /**
     * 查询判断题
     *
     * @param id 判断题主键
     * @return 判断题
     */
    public Judge selectJudgeById(Long id);

    /**
     * 查询判断题列表
     *
     * @param judge 判断题
     * @return 判断题集合
     */
    public List<Judge> selectJudgeList(Judge judge);

    /**
     * 新增判断题
     *
     * @param judge 判断题
     * @return 结果
     */
    public int insertJudge(Judge judge);

    /**
     * 修改判断题
     *
     * @param judge 判断题
     * @return 结果
     */
    public int updateJudge(Judge judge);

    /**
     * 删除判断题
     *
     * @param id 判断题主键
     * @return 结果
     */
    public int deleteJudgeById(Long id);

    /**
     * 批量删除判断题
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteJudgeByIds(Long[] ids);

    Judge selectJudgeByTitle(String title);

    @Select("select id from tb_judge where qu_bank_id = #{quBankId}")
    Long[] getAllJudgeIds(@Param("quBankId") long quBankId);
}
